﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Text;
using System.Threading.Tasks;

namespace EmailManager
{
    public class YahooEMailManager
    {
        public void SendEmail()
        {
            try
            {
                SmtpClient emailClient = new SmtpClient("smtp.mail.yahoo.com");
                System.Net.NetworkCredential SMTPUserInfo = new System.Net.NetworkCredential("evanization@yahoo.com", "Mswinse123");
                emailClient.EnableSsl = true;
                emailClient.Credentials = SMTPUserInfo;
                emailClient.Port = 465;

                MailMessage message = new System.Net.Mail.MailMessage("evanization@yahoo.com", "v-kartc@microsoft.com", "Programmatic email", "Just testing!!!");
                emailClient.Timeout = 300000;
                emailClient.Send(message);
            }
            catch (Exception ex)
            {

            }
        }
    }
}
